'use strict'

const gulp = require('gulp')
const postcss = require('gulp-postcss')
const sass = require('gulp-sass')

gulp.task('compile', function() {
  return gulp.src('./dist/css/*.scss')
    .pipe(sass({outputStyle: 'expanded'}))   // nested(默认), expanded, compact, compressed
    .pipe(postcss())
    .pipe(gulp.dest('./dist/css'))
})

gulp.task('build', ['compile'])
gulp.task('watch', function () {
  gulp.watch('./dist/css/*.scss', ['build'])
})
